package com.coderman.basketball.adapter.admin;

import com.coderman.basketball.client.api.member.PlayerFacade;
import com.coderman.basketball.client.dto.member.PlayerDTO;
import com.coderman.basketball.client.dto.member.PlayerSignUpDTO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;


/**
 * Description:
 * date: 2021/4/22
 *
 * @author shenshuai
 * @version 1.0.0
 * @since JDK 1.8
 *
 */
@RestController
@RequestMapping("/player")
public class PlayerController {
    private Logger logger = LoggerFactory.getLogger(PlayerController.class);

    @Autowired
    private PlayerFacade playerFacade;
    /**
     * 报名服务
     * @return
     */
    @RequestMapping(value = "/signup",method= RequestMethod.GET)
    public String signUp(){
        System.out.println("============");
        PlayerSignUpDTO playerSignUpDTO = new PlayerSignUpDTO();
        playerSignUpDTO.setName("勒布朗詹姆斯");
        playerSignUpDTO.setSeason("2003");
        playerSignUpDTO.setSignUpDate(new Date());
        PlayerDTO playerDTO = new PlayerDTO();
        playerDTO.setAddress("俄亥俄州阿克伦");
        playerSignUpDTO.setPlayerDTO(playerDTO);
        //playerFacade.signUp(playerSignUpDTO);
        return "success";
    }

    /**
     * 获取球员详情
     * 数据统计
     * 个人信息
     * 个人荣誉
     * 个人履历
     */
    @RequestMapping(value = "/detail")
    public String getPlayerDetail(){
        return "";
    }

}
